package language.basic.oopBase;

interface Ve{}

interface Vehicle extends Ve{
    String msg="我是一辆车"; //接口里的常量默认是public static final的全局常量
    default void print(){ //default可以实现方法体
        System.out.println(msg);
    }
}

class Small implements Vehicle{
    public static void main(String[] args) {
        Vehicle vehicle = new Small(); //声明接口变量
        vehicle.print();

        if (vehicle instanceof Vehicle){ //true
            System.out.println("instanceof usage");
        };
    }
}
